package com.chezai.client.activitys;

import android.os.Bundle;
import android.view.View;

import com.chezai.client.R;
import com.chezai.client.global.DeviceFactory;

import butterknife.OnClick;

/**
 * Created by likunyang on 2017/10/23.
 */

public class TestPowerActivity extends BaseActivity {
    @Override
    public int getLayoutId() {
        return R.layout.activity_test_power;
    }

    @Override
    public void initView(Bundle savedInstanceState) {

    }

    @Override
    public void initData() {

    }

    @OnClick({R.id.btn_open, R.id.btn_close})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_open:
                DeviceFactory.hardware.controlRelay(true);
                break;
            case R.id.btn_close:
                DeviceFactory.hardware.controlRelay(false);
                break;
        }
    }
}
